package net.sunofbeach.blog.controller.portal;

import net.sunofbeach.blog.response.ResponseResult;
import net.sunofbeach.blog.services.IPdfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/portal/pdf")
public class PdfPortalApi {

    @Autowired
    private IPdfService pdfService;

    @GetMapping("/list/{page}/{size}")
    public ResponseResult listDiary(@PathVariable("page") int page,
                                    @PathVariable("size") int size) {
        return pdfService.listPdfs(page, size);
    }



}
